<template>
    <div>
      <p><input type="text" v-model="msg"></p>
    </div>
  </template>
  
  <script setup>
  import {ref,onBeforeMount,onMounted,onUpdated,onUnmounted} from 'vue'
  const msg = ref('')
  console.log('子组件',1);
  onBeforeMount(()=>{
    console.log('子组件',2);
  })
  onMounted(()=>{
    console.log('子组件',3);
  })
  onUpdated(()=>{
    console.log('子组件更新');
  })
  onUnmounted(()=>{
    console.log('子组件销毁');
  })
  </script>